From: Thomas Weißschuh Date: Sun, 24 Oct 2021 08:59:57 +0000 (+0200) Subject: fw4.uc: Do not quote port ranges X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22%24PHP_SELF/%22https:/collectd.org/%22%24PHP_SELF?a=commitdiff_plain;h=eb0a3ee812d48f1faecbf6258c293e475b4016a0;p=project%2Ffirewall4.git fw4.uc: Do not quote port ranges This fixes the translation of rules like the following: config rule ... option dest_port '67:68' Signed-off-by: Thomas Weißschuh --- diff --git a/root/usr/share/ucode/fw4.uc b/root/usr/share/ucode/fw4.uc index f0e180d..c07b355 100644 --- a/root/usr/share/ucode/fw4.uc +++ b/root/usr/share/ucode/fw4.uc @@ -1374,7 +1374,7 @@ return { }, quote: function(s, force) { - if (force === true || !match(s, /^([0-9A-Fa-f:.\/]+)( \. [0-9A-Fa-f:.\/]+)*$/)) + if (force === true || !match(s, /^([0-9A-Fa-f:.\/-]+)( \. [0-9A-Fa-f:.\/-]+)*$/)) return sprintf('"%s"', replace(s + "", /(["\\])/g, '\\$1')); return s;